const path = require('path');

function resolve(dir) {
    return path.join(__dirname, dir);
}


module.exports = {
    publicPath: '/',
    outputDir: 'dist',
    assetsDir: 'static',
    lintOnSave: true,
    css: {
        loaderOptions: {
            sass: {
                prependData: '@import \'~@/assets/style/public.scss\';'
            }
        }
    },
    devServer: {
        // port: 8080,
        open: true,
        overlay: {
            warnings: false,
            errors: false
        },
        proxy: {
            '/taxi-server': {
                target: 'https://guanli.wisdomtaxi.com'
            },
        }
    },
    configureWebpack: {
        name: 'MG',
        resolve: {
            //定义别名
            alias: {
                '@': resolve('src'),
                '@assets': resolve('src/assets'),
                '@css': resolve('src/assets/css'),
                '@c': resolve('src/components'),
                '@imgs': resolve('src/assets/imgs'),
                '@libs': resolve('src/libs'),
                '@utils': resolve('src/utils')
            }
        }
    },
}
